extends layout

block content

  h1 Author: #{author.name}
  p #{author.lifespan}

  div(style='margin-left:20px;margin-top:20px')

    h2(style='font-size: 1.5rem;') Books
    if author_books.length
      dl
        each book in author_books
          dt
            a(href=book.url) #{book.title}
          dd #{book.summary}
    else
      p This author has no books.

  hr
  p
    a(href=author.url+'/delete') Delete author
  p
    a(href=author.url+'/update') Update author
